package net.servir.capacidades.web.controller;

import net.servir.capacidades.service.CapacidadesService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/tieneresponsable")
public class JsonConsultaResponsableController {
	@Autowired 
	private CapacidadesService capacidadesService;

	@RequestMapping(value="/{id_ejecutora}", method = RequestMethod.GET)
	public @ResponseBody
	Integer tieneResponsable(@PathVariable("id_ejecutora") Integer id_ejecutora) {
		return capacidadesService.tieneResponsableLaEjecutora(id_ejecutora);
	}
}
